<?php

namespace fastphp\util;

/**
 *设置请求头
 */
class Header
{

    /**
     * @param string $encode
     * @return void
     */
    public static function setJsonHeader(string $encode="utf-8")
    {
        header("Content-Type: application/json;charset=$encode");
    }

    public static function setLocation($path)
    {
        header("Location: $path");
    }
}